The present invention generally relates to a memory controller for a flash memory, a flash memory system having the memory controller, and a method of controlling the flash memory.
As shown in Reference 1 (JP-A-2004-533029) or Reference 2 (JP-A-2005-190288), in a memory system employing a flash memory in which data erasing is performed in physical blocks, when updating or rewriting data stored in the flash memory, the latest data are stored in a different physical block from a physical block storing previous data replaced by the latest data. There are many cases where partial data of data stored in the physical block storing the previous data are not replaced by the latest data.
In a case where effective data, which is the partial data not replaced by the latest data, stored in the physical block storing the previous data are transferred to a physical block to store the latest data, the update operations takes a longer time than operations without transferring the effective data. This demerit can be avoided by allowing existence of plural physical blocks corresponding to the same logical block as each other. By allowing it, for example, some of effective data corresponding to one logical block are stored in one of 2 physical blocks corresponding to the same logical block as each other, the other of the effective data are stored in the other of the 2 physical blocks. Incidentally, in a case where there are plural sectors of data corresponding to the same logical address as each other, the latest one of them is treated as effective data and the others of them are treated as ineffective data. That is, data not replaced by any other data are treated as effective data, and data replaced by any other data are treated as ineffective data.